# Troubleshooting

# Xamarin Build error (1) Error: linker command failed with exit code 1

This linker error occurs when AppSealing library link setting is not set in the project build properties. As shown in the figure below, the following values must be entered in “Additional arguments:” of the build properties.

# Xamarin Build error (2) Error: warning: directory not found for option '-L/Users/…/AppSealingSDK/Libraries' (TestApp-Xamarin) Native linking

This error occurs when the AppSealingSDK.zip file is extracted to the incorrect path. In the finder, make sure that a folder named "AppSealingSDK" has been created under the project path and a "Libraries" folder exists under it.

# Xamarin Build error (2) Error: file not found: /Users/.../libStaticAppSec.a (TestApp-Xamarin)

This error occurs when the "libStaticAppSec.a" file does not exist in "AppSealingSDK/ Libraries" folder or is named incorrectly. Check if the libStaticAppSec.a file exists in the "{project_path}/AppSealingSDK/Libraries" folder in Finder.

If any files are missing or corrupt, unzip the AppSealing SDK zip file again or download a new one.

# Execution error (I) App terminated immediately after launch

If the app exits immediately after launch on the device, check the launch log message to ensure the bundle id is valid. If the log indicating that the app has been terminated is only output of the Visual Studio trace window, and logs related to AppSealing are not displayed normally, check the log through the console app.

If the log message contains string like " ==>> FAILED( Not registered bundle name )" then it tells the bundle Id you used is not registered properly at AppSealing Developer Center (ADC) while downloading AppSealing SDK file. Check your bundle Id if it is same as the value you entered when downloading SDK at ADC.

# Execution error (II) App terminated suddenly while running

If your app has terminated suddenly while running about after 20 seconds from launching you should check the execution log message whether you have run your app with Release configuration.

If the log message contains string like "Message from debugger: Terminated due to signal 14" then it tells that you have built & run your app in Release configuration and so AppSealing detection logic has activated. AppSealing logic in Release configuration checks some security intrusion such as jailbreak, debugger attachment, execution file encryption flag and if there is some problem it will close the app after 20 seconds irrespectively of user action or other circumstances.

Only in Release configuration the AppSealing logic will be activated and will terminate your app, so you should run your app with Debug configuration until you distribute the app to AppStore or TestFlight because the built executable file doesn't have encrypted with FairPlay DRM before it is installed from AppStore to device. AppSealing logic will detect that executable file has decrypted abnormally and it will terminate the app after 20 seconds while running your app in device at Visual Studio.

# Cannot execute “generate_hash” : Permission denied

It may happens that script execution in step 4-1 “Generate App integrity and certificate snapshot” fails by “Permission denied” error message like below.

In this situation run add permission command like below and try again.

$ chmod +x AppSealingSDK/Tools/generate_hash
Last Updated: 4/4/2023, 11:19:53 AM